// 数据API的混合数据版本
import { hybridRequest } from './hybridApi';

// 获取今日数据
export const getTodayData = (params) => {
  return hybridRequest('/data/today', { method: 'GET', params });
};

// 获取历史数据
export const getHistoryData = (params) => {
  return hybridRequest('/data/history', { method: 'GET', params });
};

// 上传设备数据
export const uploadDeviceData = (data) => {
  return hybridRequest('/data/upload', { method: 'POST', data });
};

// 获取数据统计
export const getDataStatistics = (params) => {
  return hybridRequest('/data/stats', { method: 'GET', params });
};

// 获取数据趋势
export const getDataTrends = (params) => {
  return hybridRequest('/data/trends', { method: 'GET', params });
};

// 获取数据分析
export const getDataAnalysis = (deviceId, type, period) => {
  return hybridRequest('/data/analysis', { 
    method: 'GET', 
    params: { deviceId, type, period } 
  });
};

// 导出数据
export const exportData = (params) => {
  return hybridRequest('/data/export', { method: 'GET', params });
};
